using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class IconPanelItem : MonoBehaviour
{
    public string m_IconPath;
    IconPanel m_IconPanel;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void Init(string sourcePath, Sprite sprite, IconPanel baba)
    {
        m_IconPath = sourcePath + sprite.name;

        var image = GetComponent<Image>();
        if(image)
        {
            image.sprite = sprite;
        }
        m_IconPanel = baba;
    }

    public void OnClicked()
    {
        m_IconPanel.Selected(this);
    }
}
